package ssh

import (
	"fmt"
)

type Ssh struct{}

func (sh Ssh) ExecCommandTest() {
	sh.LoginEcs("47.96.118.198", "/usr/local/nginx/sbin/nginx -s reload")
}

func (sh Ssh) stopNginx() {
	res := sh.LoginEcs("47.96.118.198", "ps -ef | grep /usr/local/nginx/sbin/nginx | grep -v grep | awk '{print$2}'")

	sh.LoginEcs("47.96.118.198", fmt.Sprintf("kill -QUIT %s", res))
}
